#include <faker/engine/ui/SceneLayer.h>

using namespace Faker::Engine::UI;

void Faker::Engine::UI::SceneLayer::Instance()
{
    if(mOpen)
    {

    if (this->mInstanced = ImGui::Begin(mTitle.c_str(), &mOpen))
    {
        this->GetPosAndSize();
        auto drawList = ImGui::GetWindowDrawList();

        drawList->AddImage(m_Texture, mPos, mEnd, ImVec2(0, 1), ImVec2(1, 0));
    }
    ImGui::End();
}
    }

void Faker::Engine::UI::SceneLayer::SetSceneTexture(const Gut::Texture2D& tex)
{
    m_Texture=(ImTextureID)tex.ID;
    
}

void Faker::Engine::UI::SceneLayer::HandleSignal()
{
    
}